home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-02 / tpnov6.zip / NOVHDR.DOC < prev    next >
Text File  |  1991-01-31  |  43KB  |  925 lines

  1. unit NovAPI;
  2.  
  3.  
  4. (**************************************************************************)
  5. (* Turbo Pascal/Novell API Interface Library                              *)
  6. (*                                                                        *)
  7. (* Copyright (c) 1991 by 'LANtic Software.                                *)
  8. (* All rights reserved.                                                   *)
  9. (*                                                                        *)
  10. (**************************************************************************)
  11.  
  12.  
  13. interface
  14.  
  15. uses DOS;
  16.  
  17. const
  18.    USER_OBJECT              = 1;
  19.    GROUP_OBJECT             = 2;
  20.    PRINT_QUEUE_OBJECT       = 3;
  21.    FILE_SERVER_OBJECT       = 4;
  22.    JOB_SERVER               = 5;
  23.    GATEWAY_OBJECT           = 6;
  24.    PRINT_SERVER_OBJECT      = 7;
  25.    ARCHIVE_QUEUE_OBJECT     = 8;
  26.    ARCHIVE_SERVER_OBJECT    = 9;
  27.    JOB_QUEUE                = 10;
  28.    ADMINSTRATIVE_OBJECT     = 11;
  29.    REMOTE_BRIDGE_SERVER     = 36;
  30.    ADVERTISING_PRINT_SERVER = 71;
  31.    ANY_OBJECT               = -1;
  32.  
  33. {$I NOVERR}
  34.  
  35.    STATIC_BINDERY  = 0;
  36.    DYNAMIC_BINDERY = 1;
  37.  
  38.    ITEM_PROPERTY   = 0;
  39.    SET_PROPERTY    = 2;
  40.  
  41.    ANYONE_READ      = $00;
  42.    LOGGED_READ      = $01;
  43.    OBJECT_READ      = $02;
  44.    SUPERVISOR_READ  = $03;
  45.    NETWORK_READ     = $04;
  46.    ANYONE_WRITE     = $00;
  47.    LOGGED_WRITE     = $10;
  48.    OBJECT_WRITE     = $20;
  49.    SUPERVISOR_WRITE = $30;
  50.    NETWORK_WRITE    = $40;
  51.  
  52.    READ_RIGHTS     = $01;
  53.    WRITE_RIGHTS    = $02;
  54.    OPEN_RIGHTS     = $04;
  55.    CREATE_RIGHTS   = $08;
  56.    DELETE_RIGHTS   = $10;
  57.    PARENTAL_RIGHTS = $20;
  58.    SEARCH_RIGHTS   = $40;
  59.    MODIFY_RIGHTS   = $80;
  60.  
  61.    STANDARD_RIGHTS = READ_RIGHTS or OPEN_RIGHTS or SEARCH_RIGHTS;
  62.    ALL_RIGHTS      = $0FF;
  63.  
  64.    NORMAL_FILES     = $00;
  65.    HIDDEN_FILES     = $02;
  66.    SYSTEM_FILES     = $04;
  67.  
  68.    FA_READ_ONLY     = $01;    (* file attibutes *)
  69.    FA_HIDDEN        = $02;
  70.    FA_SYSTEM        = $04;
  71.    FA_EXECUTE_ONLY  = $08;
  72.    FA_SUBDIRECTORY  = $10;
  73.    FA_ARCHIVE       = $20;
  74.    FA_SHAREABLE     = $80;
  75.  
  76.    EFA_TRANSACTIONAL = $10;   (* extended file attributes *)
  77.    EFA_INDEXED       = $20;
  78.    EFA_READ_AUDIT    = $40;
  79.    EFA_WRITE_AUDIT   = $80;
  80.  
  81.    PREVENT_QUEUE_ADDS     = 01;
  82.    PREVENT_SERVER_ATTACH  = 02;
  83.    PREVENT_SERVER_SERVICE = 04;
  84.  
  85.    OPERATOR_HOLD      = $80;
  86.    USER_HOLD          = $40;
  87.    ENTRY_OPEN         = $20;
  88.    SERVICE_RESTART    = $10;
  89.    SERVICE_AUTO_START = $08;
  90.  
  91.  
  92. type
  93.    QueueTimeRecord = RECORD
  94.          Year      : 0..255;
  95.          Month     : 1..12;
  96.          Day       : 1..31;
  97.          Hour      : 0..23;
  98.          Minute    : 0..59;
  99.          Second    : 0..59;
  100.       end;
  101.    ServerTimeRecord = QueueTimeRecord;
  102.  
  103.    Days = (SUNDAY,MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY,SATURDAY);
  104.  
  105.    NetworkTimeRecord = RECORD
  106.          Year      : 0..255;
  107.          Month     : 1..12;
  108.          Day       : 1..31;
  109.          Hour      : 0..23;
  110.          Minute    : 0..59;
  111.          Second    : 0..59;
  112.          DayOfWeek : 0..6;
  113.       end;
  114.  
  115.    string13  = string[13];
  116.    string15  = string[15];
  117.    string16  = string[16];
  118.    string27  = string[27];
  119.    string47  = string[47];
  120.    string48  = string[48];
  121.    string55  = string[55];
  122.    string60  = string[60];
  123.    string63  = string[63];
  124.    string64  = string[64];
  125.    string79  = string[79];
  126.    string80  = string[80];
  127.    string99  = string[99];
  128.    string100 = string[100];
  129.    string126 = string[126];
  130.    string127 = string[127];
  131.  
  132.    Array32    = array[1..32] of byte;
  133.  
  134.    Array32Ptr = ^Array32;
  135.  
  136.    ServerName = array[1..48] of char;
  137.  
  138.    NameTable = array[1..8] of ServerName;
  139.  
  140.    NameTablePtr = ^NameTable;
  141.  
  142.    LPTNames = (LPT1,LPT2,LPT3);
  143.  
  144.    DownServerCommands = (CONDITIONAL,FOURCE_IT);
  145.  
  146.    WhichJobs = (THIS_JOB,ALL_JOBS);
  147.  
  148.    BroadcastModes = (STORE_DISPLAY,REJECT_DISPLAY,REJECT_IGNORE,STORE_IGNORE);
  149.  
  150.    LockModes = (NETWARE46,ADVANCED_NETWARE);
  151.  
  152.    LockDirectives = (EXCLUSIVE,SHAREABLE_READ_ONLY);
  153.  
  154.    LogModes = (LOG_ONLY,LOG_AND_LOCK);
  155.  
  156.    LogicalLockDirectives = (LOG_LOCK,EXCLUSIVE_LOCK,dummy,SHARABLE_READ_ONLY_LOCK);
  157.  
  158.    EndOfJobStatus = (DISABLE_EOJ,ENABLE_EOJ);
  159.  
  160.    ErrorModes = (NETWARE_CRITICAL,EXTENDED_ALL,EXTENDED_CRITICAL);
  161.  
  162.    CommentTypes = (UNKNOWN,CONNECT_TIME,STORAGE,LOG_IN,LOG_OUT,
  163.                    ACC_LOCKED,TIME_MODIFIED,AUDIT_NOTE);
  164.  
  165.    TrusteeIDArray     = array[1..5] of longint;
  166.    TrusteeRightsArray = array[1..5] of byte;
  167.  
  168.    NetworkAddress = array[1..4] of byte;
  169.    NodeAddress    = array[1..6] of byte;
  170.    SocketAddress  = word;
  171.  
  172.    InternetworkAddress = RECORD
  173.          NetworkNumber      : NetworkAddress;
  174.          PhysicalNodeNumber : NodeAddress;
  175.          SocketNumber       : SocketAddress;
  176.       end;
  177.  
  178.    ConnectionEntry = RECORD
  179.          InUse              : boolean;
  180.          ConnectionID       : byte;
  181.          ServerAddress      : InternetworkAddress;
  182.          ReceiveTimeOut     : word;
  183.          RouterPhysicalNode : NodeAddress;
  184.          SequenceNumber     : byte;
  185.          ConnectionNumber   : byte;
  186.          ConnectionOK       : byte;
  187.          MaximumTimeOut     : word;
  188.          Filler             : array[1..5] of byte;
  189.       end;
  190.  
  191.    ConnectionTable = array[1..8] of ConnectionEntry;
  192.    ConnectionTablePointer = ^ConnectionTable;
  193.  
  194.    DriveHandleTable = array[1..32] of byte;
  195.    DriveHandleTablePtr = ^DriveHandleTable;
  196.  
  197.    DriveConnectionTable = array[1..32] of byte;
  198.    DriveConnectionTablePtr = ^DriveConnectionTable;
  199.  
  200.    DriveFlagTable = array[1..32] of byte;
  201.    DriveFlagTablePtr = ^DriveFlagTable;
  202.  
  203.    FormArray = array[1..22] of char;
  204.    BannerArray = array[1..13] of char;
  205.    FileArray = array[1..14] of char;
  206.    DirArray = array[1..80] of char;
  207.    DescripArray = array[1..50] of char;
  208.  
  209.    NetwarePrintQueueHeaderType = RECORD
  210.          ClientAreaVersion : byte;
  211.          TabSize           : byte;
  212.          NumberCopies      : word;
  213.          Unknown           : byte;
  214.          PrintFlags        : byte;   (* >>   bit 80 = Use Banner, 40 = Use tabs  *)
  215.          PageWidth         : word;   (*          08 = FF off,     04 = ????      *)
  216.          PageLength        : word;
  217.          FormName          : FormArray;
  218.          BannerPhrase      : BannerArray;
  219.          BannerFile        : BannerArray;
  220.          FileName          : FileArray;
  221.          NetworkPath       : DirArray;
  222.       end;
  223.  
  224.    FileServerFileHandle = RECORD
  225.           case integer of
  226.              0 : (Bytes : array[1..6] of byte);
  227.              1 : (Words : array[1..3] of word);
  228.        end;
  229.  
  230.    JobEntryRecord = RECORD
  231.          ClientStation        : byte;
  232.          ClientTask           : byte;
  233.          ClientIDNumber       : longint;
  234.          TargetServerIDNumber : longint;
  235.          TargetExecutionTime  : QueueTimeRecord;
  236.          JobEntryTime         : QueueTimeRecord;
  237.          JobNumber            : word;
  238.          JobType              : word;
  239.          JobPosition          : byte;
  240.          JobControlFlags      : byte;
  241.          JobFileName          : array[1..14] of char;
  242.          JobFileHandle        : FileServerFileHandle;
  243.          ServerStation        : byte;
  244.          ServerTask           : byte;
  245.          ServerIDNumber       : longint;
  246.          TextJobDescription   : DescripArray;
  247.          ClientRecordArea     : array[1..152] of byte;
  248.       end;
  249.  
  250.    JobArray = array[1..250] of word;
  251.  
  252.    CaptureFlags = RECORD
  253.          Status               : byte;
  254.          PrintFlags           : byte;
  255.          TabSize              : byte;
  256.          ServerPrinter        : byte;
  257.          NumberOfCopies       : byte;
  258.          FormType             : byte;
  259.          reserved1            : byte;
  260.          BannerText           : BannerArray;
  261.          reserved2            : byte;
  262.          LocalLPTDevice       : LPTNames;
  263.          FlushTimeOutCount    : word;
  264.          FlushOnDeviceClose   : byte;
  265.          MaxLines             : word;
  266.          MaxChars             : word;
  267.          FormName             : BannerArray
  268.       end;
  269.  
  270.    PrintFlagInformation = RECORD
  271.          CaptureInfo                : CaptureFlags;
  272.          LPTCaptureFlagSet          : boolean;
  273.          FileCaptureFlagSet         : boolean;
  274.          TimingOutFlagSet           : boolean;
  275.          PrinterSetupString         : pointer;
  276.          PrinterResetString         : pointer;
  277.          QueuingServerConnectionNbr : byte;
  278.          CaptureInProgress          : boolean;
  279.          PrintQueueFlagSet          : boolean;
  280.          PrintJobIsValid            : boolean;
  281.          PrintQueueObjectID         : longint;
  282.          PrintJobNumber             : word;
  283.       end;
  284.  
  285.    IDList = array[1..25] of longint;
  286.  
  287.    StationList = array[1..25] of byte;
  288.  
  289.    ServerStatusType = RECORD
  290.          JobPrice     : longint;
  291.          Description  : array[1..60] of byte;
  292.       end;
  293.  
  294.    DynamicMemoryRec = RECORD
  295.          TotalDynamicSpace       : longint;
  296.          MaxUsedDynamicSpace     : longint;
  297.          CurrentUsedDynamicSpace : longint;
  298.       end;
  299.  
  300.    ServerMiscInformation = RECORD
  301.          SystemElapsedTime            : longint;
  302.          ProcessorType                : byte;
  303.          reserved                     : byte;
  304.          NumberOfServiceProcesses     : byte;
  305.          ServerUtilizationPercentage  : byte;
  306.          ConfiguredMaxBinderyObjects  : word;
  307.          ActualMaxBinderyObjects      : word;
  308.          CurrentUsedBinderyObjects    : word;
  309.          TotalServerMemory            : word;
  310.          WastedServerMemory           : word;
  311.          DynamicMemoryRecs            : word;
  312.          DynamicMemory                : array[1..3] of DynamicMemoryRec;
  313.       end;
  314.  
  315.    ServerLANIOStatistics = RECORD
  316.          SystemElapsedTime                     : longint;
  317.          ConfiguredMaxRoutingBuffers           : word;
  318.          ActualMaxUsedRoutingBuffers           : word;
  319.          CurrentlyUsedRoutingBuffers           : word;
  320.          TotalFileServicePackets               : longint;
  321.          FileServicePacketsBuffered            : word;
  322.          InvalidConnectionPackets              : word;
  323.          BadLogicalConnectionNumber            : word;
  324.          PacketsReceivedDuringProcessing       : word;
  325.          ReprocessedRequests                   : word;
  326.          BadSequenceNumberPackets              : word;
  327.          DuplicateRepliesSent                  : word;
  328.          AcknowledgesSent                      : word;
  329.          PacketsWithBadRequestType             : word;
  330.          AttachDuringProcessing                : word;
  331.          AttachWhileProcessingAttach           : word;
  332.          ForgedDetachRequests                  : word;
  333.          DetachForBadConnectionNumber          : word;
  334.          DetachDuringProcessing                : word;
  335.          RepliesCanceled                       : word;
  336.          PacketsDiscardedByHopCount            : word;
  337.          PacketsDiscardedUnknownNet            : word;
  338.          IncomingPacketDiscardedNoDGroupBuffer : word;
  339.          OutgoingPacketDiscardedNoBuffer       : word;
  340.          IPXnotMyNetwork                       : word;
  341.          NETBIOSbroadcastWasPropagated         : longint;
  342.          TotalOtherPackets                     : longint;
  343.          TotalRoutedPackets                    : longint;
  344.       end;
  345.  
  346.    FileSystemStatistics = RECORD
  347.          SystemElapsedTime                     : longint;
  348.          ConfiguredMaxOpenFiles                : word;
  349.          ActualMaxOpenFiles                    : word;
  350.          CurrentOpenFiles                      : word;
  351.          TotalFilesOpened                      : longint;
  352.          TotalReadRequests                     : longint;
  353.          TotalWriteRequests                    : longint;
  354.          CurrentChangedFATS                    : word;
  355.          TotalChangedFATS                      : word;
  356.          FATWriteErrors                        : word;
  357.          FatalFATWRiteErrors                   : word;
  358.          FATScanErrors                         : word;
  359.          ActualMaxIndexedFiles                 : word;
  360.          ActiveIndexedFiles                    : word;
  361.          AttachedIndexedFiles                  : word;
  362.          AvailableIndexedFiles                 : word;
  363.       end;
  364.  
  365.    FileServerInformation = RECORD
  366.          ServerName                 : string47;
  367.          NetWareVersion             : byte;
  368.          NetWareSubVersion          : byte;
  369.          ConnectionsSupported       : word;
  370.          ConnectionsInUse           : word;
  371.          MaxConnectedVolumes        : word;
  372.          OSRevisionNumber           : byte;
  373.          SFTLevel                   : byte;
  374.          TTSLevel                   : byte;
  375.          PeakConnectionsUsed        : word;
  376.          AccountingVersion          : byte;
  377.          VAPVersion                 : byte;
  378.          QueuingVersion             : byte;
  379.          PrintServerVersion         : byte;
  380.          VirtualConsoleVersion      : byte;
  381.          SecurityRestrictionsLevel  : byte;
  382.          InternetworkBridgeVersion  : byte;
  383.          Reserved                   : array[1..60] of byte;
  384.       end;
  385.  
  386.    ChannelSyncType = (AVAILABLE,               x1,
  387.                       NETWARE_NONE_WAITING,    x2,
  388.                       NETWARE_WAITING,         x3,
  389.                       OTHER_NONE_WAITING,      x4,
  390.                       OTHER_NETWARE_WAITING,   x5,
  391.                       RELEASED_NETWARE_WAITING);
  392.  
  393.    DiskChannelStatistics = RECORD
  394.          SystemElapsedTime                     : longint;
  395.          ChannelState                          : integer;
  396.          ChannelSynchronizationState           : ChannelSyncType;
  397.          spacer                                : byte;
  398.          DriverType                            : byte;
  399.          DriverMajorVersion                    : byte;
  400.          DriverMinorVersion                    : byte;
  401.          DriverDescription                     : string64;
  402.          FirstIOAddressUsed                    : word;
  403.          FirstIOAddressLength                  : word;
  404.          SecondIOAddressUsed                   : word;
  405.          SecondIOAddressLength                 : word;
  406.          FirstSharedMemoryAddress              : array[1..3] of byte;
  407.          FirstSharedMemoryAddressLength        : word;
  408.          SecondSharedMemoryAddress             : array[1..3] of byte;
  409.          SecondSharedMemoryAddressLength       : word;
  410.          Interrupt1Used                        : boolean;
  411.          Interrupt1                            : byte;
  412.          Interrupt2Used                        : boolean;
  413.          Interrupt2                            : byte;
  414.          DMAChannel1Used                       : boolean;
  415.          DMAChannel1                           : byte;
  416.          DMAChannel2Used                       : boolean;
  417.          DMAChannel2                           : byte;
  418.          FlagBits                              : byte;
  419.          reserved                              : byte;
  420.          ConfigurationDescription              : string79;
  421.       end;
  422.  
  423.    DiskCacheStatistics = RECORD
  424.          SystemElapsedTime                : longint;
  425.          BufferCount                      : integer;
  426.          BufferSize                       : integer;
  427.          DirtyBuffers                     : integer;
  428.          ReadRequests                     : longint;
  429.          WriteRequests                    : longint;
  430.          Hits                             : longint;
  431.          Misses                           : longint;
  432.          PhysicalReadRequests             : longint;
  433.          PhysicalWriteRequests            : longint;
  434.          PhysicalReadErrors               : integer;
  435.          PhysicalWriteErrors              : integer;
  436.          GetRequests                      : longint;
  437.          FullWriteRequests                : longint;
  438.          PartialWriteRequests             : longint;
  439.          BackgroundDirtyWrites            : longint;
  440.          BackgroundAgedWrites             : longint;
  441.          TotalWrites                      : longint;
  442.          Allocations                      : longint;
  443.          ThrashingCount                   : integer;
  444.          LRUBlockWasDirty                 : integer;
  445.          ReadBeyondWrite                  : integer;
  446.          FragmentedWriteOccurred          : integer;
  447.          HitOnUnavailablleBlock           : integer;
  448.          BlockScrapped                    : integer;
  449.       end;
  450.  
  451.    VolumeInformation = RECORD
  452.          SectorsPerBlock         : word;
  453.          TotalBlocks             : word;
  454.          AvailableBlocks         : word;
  455.          TotalDirectorySlots     : word;
  456.          AvailableDirectorySlots : word;
  457.          VolumeName              : string15;
  458.          RemovableVolume         : boolean;
  459.       end;
  460.  
  461.    WorkstationEnvironment = RECORD
  462.          WorkstationOperatingSystem   : byte;
  463.          MajorNetWareShellVersion     : byte;
  464.          MinorNetWareShellVersion     : byte;
  465.          ShellRevisionNumber          : byte;
  466.          Environment                  : array[1..40] of char;
  467.       end;
  468.  
  469.    SemaphoreInfo = RECORD
  470.          OpenCount      : word;
  471.          Value          : byte;
  472.          TaskNumber     : byte;
  473.          Name           : string[127];
  474.       end;
  475.  
  476.    SemaphoreInfoArray = array[1..5] of SemaphoreInfo;
  477.  
  478.    DriveMapArray = array[1..32] of byte;
  479.    ServerDriveMappingTable = RECORD
  480.          SystemElapsedTime    : longint;
  481.          SFTLevel             : byte;
  482.          LogicalDriveCount    : byte;
  483.          PhysicalDriveCount   : byte;
  484.          DiskChannelTable     : array[1..5] of byte;
  485.          PendingIOCommands    : word;
  486.          DriveMappingTable    : DriveMapArray;
  487.          DriveMirrorTable     : DriveMapArray;
  488.          DeadMirrorTable      : DriveMapArray;
  489.          RemirroredDrive      : byte;
  490.          reserved             : byte;
  491.          RemirroredBlock      : longint;
  492.          SFTErrorTable        : array[1..60] of byte;
  493.       end;
  494.  
  495.    RemainingSpaceRecord = RECORD
  496.          SystemElapsedTime    : longint;
  497.          ObjectID             : longint;
  498.          UnusedDiskBlocks     : longint;
  499.          RestrictionsEnforced : boolean;
  500.       end;
  501.  
  502.    PhysicalVolumeInformation = RECORD
  503.          SystemElapsedTime             : longint;
  504.          VolumeNumber                  : byte;
  505.          LogicalDriveNumber            : byte;
  506.          SectorsPerBlock               : word;
  507.          StartingBlockNumber           : longint;
  508.          TotalBlocks                   : word;
  509.          AvailableBlocks               : word;
  510.          TotalDirectorySlots           : word;
  511.          AvailableDirectorySlots       : word;
  512.          ActualMaxUsedDirectoryEntries : word;
  513.          IsHashing                     : boolean;
  514.          IsCaching                     : boolean;
  515.          IsRemovable                   : boolean;
  516.          IsMounted                     : boolean;
  517.          Name                          : string15;
  518.       end;
  519.  
  520.    PhysicalDiskStatistics = RECORD
  521.          SystemElapsedTime             : longint;
  522.          PhysicalDiskChannel           : byte;
  523.          DriveRemovable                : boolean;
  524.          DriveType                     : byte;
  525.          ControllerDriveNumber         : byte;
  526.          ControllerNumber              : byte;
  527.          ControllerType                : byte;
  528.          DriveSize                     : longint;
  529.          DriveCylinders                : word;
  530.          DriveHeads                    : byte;
  531.          SectorsPerTrack               : byte;
  532.          DriveDefinitionString         : string63;
  533.          IOErrorCount                  : integer;
  534.          HotFixTableStart              : longint;
  535.          HotFixTableSize               : integer;
  536.          HotFixBlocksAvailable         : integer;
  537.          HotFixDisabled                : boolean;
  538.       end;
  539.  
  540.    AccountHoldServerRec = RECORD
  541.          ServerID      : longint;
  542.          Amount        : longint;
  543.       end;
  544.  
  545.    AccountHoldServerArray = array[1..16] of AccountHoldServerRec;
  546.  
  547.    SemaphoreInformation = RECORD
  548.          LogicalConnectionNumber : integer;
  549.          TaskNumber              : byte;
  550.       end;
  551.    SemaphoreInformationRecords = array[1..168] of SemaphoreInformation;
  552.  
  553.  
  554. var
  555.    NetResult     : integer;
  556.  
  557. procedure AbortServiceQueueJob(QueueID : longint; JobNumber : integer);
  558. procedure AddObjectToSet(WhichObject : string47; WhatType : integer;
  559.                          WhichProperty : string15;
  560.                          NewMemberName : string47; NewMemberType : integer);
  561. procedure AddTrusteeToDirectory(WhichObjectID : longint;
  562.                                 DirectoryHandle : integer; Directory : string;
  563.                                 RightsMask : byte);
  564. procedure AllocPermanentDirectoryHandle(CurrentHandle : byte;
  565.                                         Directory : string; DriveLetter : char;
  566.                                         var NewHandle, EffectiveRights : byte);
  567. procedure AllocSpecialTemporaryDirectoryHandle(CurrentHandle : byte;
  568.                                         Directory : string; DriveLetter : char;
  569.                                         var NewHandle, EffectiveRights : byte);
  570. procedure AllocTemporaryDirectoryHandle(CurrentHandle : byte;
  571.                                         Directory : string; DriveLetter : char;
  572.                                         var NewHandle, EffectiveRights : byte);
  573. procedure AttachServerToQueue(QueueID : longint);
  574. procedure AttachToFileServer(ConnectionID : byte);
  575. procedure BroadcastToConsole(Message : string60);
  576. procedure CancelLPTCapture;
  577. procedure CancelSpecificCapture(Device : LPTNames);
  578. procedure ChangeJobQueueEntry(QueueID : longint;
  579.                               var Job : JobEntryRecord);
  580. procedure ChangeJobQueuePosition(QueueID : longint; JobNumber : integer;
  581.                                  NewPosition : byte);
  582. procedure ChangeObjectPassword(WhichObject : string47; WhatType : integer;
  583.                                OldPassword, NewPassword : string127);
  584. procedure ChangeObjectSecurity(WhichObject : string47; WhatType : integer;
  585.                                NewSecurity : byte);
  586. procedure ChangePropertySecurity(WhichObject : string47; WhatType : integer;
  587.                                  WhichProperty : string15; NewSecurity : byte);
  588. procedure ChangeServersRightsToClientsRights(QueueID : longint; JobNumber : integer);
  589. procedure CheckPipeStatus(ConnectionList : string100;
  590.                           var ResultList : string100);
  591. procedure ClearConnectionNumber(LogicalConnectionNumber : byte);
  592. procedure ClearFile(FileName : string);
  593. procedure ClearFileSet;
  594. procedure ClearLogicalRecord(LogicalRecordName : string99);
  595. procedure ClearLogicalRecordSet;
  596. procedure ClearPhysicalRecord(FileHandle : integer;
  597.                               RecordOffset, RecordLength : longint);
  598. procedure ClearPhysicalRecordSet;
  599. procedure CloseAndStartQueueJob(QueueID : longint; JobNumber : integer);
  600. procedure CloseBindery;
  601. procedure CloseMessagePipe(ConnectionList : string100;
  602.                           var ResultList : string100);
  603. procedure CloseSemaphore(SemaphoreHandle : longint);
  604. function  ConnectionNumber : integer;
  605. procedure CreateDirectory(NewDirectory : string; NewDirectoryHandle : byte;
  606.                           MaximumRights : byte);
  607. procedure CreateObject(NewObject : string47; NewType : integer;
  608.                        ObjectFlag,ObjectSecurity : byte);
  609. procedure CreateProperty(WhichObject : string47; WhatType : integer;
  610.                          NewProperty : string15; NewFlags,NewSecurity : byte);
  611. procedure CreateQueue(QueueName,QueuePath : string; QueueBase : byte;
  612.                       var NewQueueID : longint);
  613. procedure CreateQueueJob(QueueID : longint; var Job : JobEntryRecord);
  614. procedure DeallocateDirectoryHandle(DirectoryHandle : byte);
  615. function  DefaultConnectionID : integer;
  616. function  DefaultLocalPrinter : LPTNames;
  617. procedure DeleteDirectory(Directory : string; DirectoryHandle : byte);
  618. procedure DeleteObject(WhichObject : string47; WhatType : integer);
  619. procedure DeleteObjectFromSet(WhichObject : string47; WhatType : integer;
  620.                               WhichProperty : string15;
  621.                               MemberName : string47; MemberType : integer);
  622. procedure DeleteProperty(WhichObject : string47; WhatType : integer;
  623.                          NewProperty : string15);
  624. procedure DeleteTrusteeFromDirectory(WhichObjectID : longint;
  625.                                      DirectoryHandle : integer;
  626.                                      Directory : string);
  627. procedure DestroyQueue(QueueID : longint);
  628. procedure DetachFromFileServer(ConnectionID : byte);
  629. procedure DetachServerFromQueue(QueueID : longint);
  630. procedure DisableFileServerLogin;
  631. procedure DisableTransactionTracking;
  632. procedure DownFileServer(OpCode : DownServerCommands);
  633. procedure EnableFileServerLogin;
  634. procedure EnableTransactionTracking;
  635. procedure EndLPTCapture;
  636. procedure EndOfJob(OpCode : WhichJobs);
  637. procedure EndSpecificCapture(Device : LPTNames);
  638. procedure EnterLoginArea(NumberOfLocalDrives : byte;
  639.                          LoginSubdirectory : string);
  640. procedure ExamineSemaphore(SemaphoreHandle : longint;
  641.                            var SemaphoreValue : integer;
  642.                            var OpenCount      : integer);
  643. procedure FileServerFileCopy(SourceHandle,DestinationHandle : word;
  644.                             SourceOffset,DestinationOffset : longint;
  645.                             BytesToCopy : longint;
  646.                             var BytesCopied : longint);
  647. function  FileServerLoginEnabled : boolean;
  648. procedure FinishServiceQueueJob(QueueID : longint; JobNumber : integer;
  649.                                 Charge : longint);
  650. procedure FlushLPTCapture;
  651. procedure FlushSpecificCapture(Device : LPTNames);
  652. procedure GetAccountStatus(WhichObject : string47; WhatType : integer;
  653.                            var AccountBalance, CreditLimit  : longint;
  654.                            var ServerList     : AccountHoldServerArray);
  655. procedure GetBannerUserName(var BannerUserName : BannerArray);
  656. procedure GetBinderyAccessLevel(var SecurityAccessLevel : byte);
  657. procedure GetBroadcastMessage(var BroadcastMessage : string55);
  658. procedure GetBroadcastMode(var Mode : BroadcastModes);
  659. procedure GetConnectionIDTable(var ShellConnectionTable : ConnectionTablePointer);
  660. procedure GetConnectionInformation(WhichConnection : integer;
  661.                                    var ObjectID    : longint;
  662.                                    var ObjectType  : integer;
  663.                                    var ObjectName  : string47;
  664.                                    var ObjectLogin : NetworkTimeRecord);
  665. procedure GetConnectionsSemaphores(ConnectionNumber : integer;
  666.                                    var LastSeen : integer;
  667.                                    var NumberRecords : byte;
  668.                                    var InfoRec : SemaphoreInfoArray);
  669. procedure GetDefaultCaptureFlags(var Flags : PrintFlagInformation);
  670. procedure GetDirectoryHandle(Drive : char;
  671.                              var DirectoryHandle, StatusFlag : byte);
  672. procedure GetDirectoryPath(DirectoryHandle : byte;
  673.                            var Directory : string);
  674. procedure GetDiskCacheStatistics(var InfoRec : DiskCacheStatistics);
  675. procedure GetDiskChannelStatistics(ChannelNbr : byte;
  676.                                    var InfoRec : DiskChannelStatistics);
  677. procedure GetDiskUtilization(WhichObjectID : longint; WhatVolume : byte;
  678.                          var UsedDirectories,UsedFiles,UsedBlocks : integer);
  679. procedure GetDriveConnectionIDTable(var DrvConnectionTable : DriveConnectionTablePtr);
  680. procedure GetDriveFlagTable(var DrvFlagTable : DriveFlagTablePtr);
  681. procedure GetDriveHandleTable(var DrvHandleTable : DriveHandleTablePtr);
  682. procedure GetDriveMappingTable(var InfoRec : ServerDriveMappingTable);
  683. procedure GetEffectiveDirectoryRights(Directory : string; DirHandle : byte;
  684.                                       var EffectiveRights : byte);
  685. procedure GetExtendedFileAttributes(FileName : string; var ExtendedAttributes : byte);
  686. procedure GetFileServerDateAndTime(var NetworkTime : NetworkTimeRecord);
  687. procedure GetFileServerDescriptionStrings(var CompanyName,Revision,RevisionDate,Copyright : string);
  688. procedure GetFileServerInformation(var InfoRec : FileServerInformation);
  689. procedure GetFileServerNameTable(var ServerNameTable : NameTablePtr);
  690. procedure GetFileSystemStatistics(var InfoRec : FileSystemStatistics);
  691. procedure GetInternetAddress(ConnectionNumber : integer;
  692.                              var ConnectionAddress : InternetworkAddress);
  693. procedure GetJobsQueueEntryFileSize(QueueID : longint;
  694.                                     JobNumber : integer;
  695.                                     var FileSize : longint);
  696. procedure GetLANDriversConfiguationInformation(WhichLAN : byte;
  697.                                            var Address     : NetworkAddress;
  698.                                            var HostAddress : NodeAddress;
  699.                                            var LANDriverInstalled : boolean;
  700.                                            var OptionNumber : byte;
  701.                                            var ConfigurationText : string);
  702. procedure GetListOfQueueJobs(QueueID : longint;
  703.                              var JobCount : integer;
  704.                              var Jobs : JobArray);
  705. procedure GetLockMode(var Mode : LockModes);
  706. procedure GetObjectConnectionNumbers(WhichObject : string47; WhatType : integer;
  707.                                      var ConnectionList : string100);
  708. procedure GetObjectID(WhichObject : string47; WhatType : integer;
  709.                       var ObjectID : longint);
  710. procedure GetObjectName(WhichObjectID : longint;
  711.                         var ObjectName : string47; var ObjectType : integer);
  712. procedure GetObjectsRemainingDiskSpace(WhichObjectID : longint;
  713.                                        var InfoRec : RemainingSpaceRecord);
  714. procedure GetPersonalMessage(var WhoSentIt : byte; var Message : string);
  715. procedure GetPrinterStatus(ServerPrinter :byte;
  716.                            var ServerPrinterStopped,
  717.                                ServerPrinterOffLine  : boolean;
  718.                            var ServerPrinterFormType : byte);
  719. procedure GetSemaphoreInformation(SemaphoreName : string;
  720.                                   var LastSeen,OpenCount : integer;
  721.                                   var Value : shortint;
  722.                                   var NumberRecords : byte;
  723.                                   var Information : SemaphoreInformationRecords);
  724. procedure GetServerLANIOStatistics(var InfoRec : ServerLANIOStatistics);
  725. procedure GetServerMiscInformation(var InfoRec : ServerMiscInformation);
  726. procedure GetSpecificCaptureFlags(Device : LPTNames;
  727.                                   var Flags : PrintFlagInformation);
  728. procedure GetStationAddress(var ThisNodeAddress : NodeAddress);
  729. procedure GetVolumeInformation(VolNumber : byte;
  730.                                var InfoRec : PhysicalVolumeInformation);
  731. procedure GetVolumeInfoWithHandle(DirHandle : integer; var InfoRec : VolumeInformation);
  732. procedure GetVolumeInfoWithNumber(VolNumber : integer; var InfoRec : VolumeInformation);
  733. procedure GetVolumeName(VolumeNumber : byte; var VolumeName : string15);
  734. procedure GetVolumeNumber(VolumeName : string15;
  735.                           var VolumeNumber : byte);
  736. procedure GetWorkstationEnvironment(var EnvironmentInfo : WorkstationEnvironment);
  737. function  IsObjectInSet(WhichObject : string47; WhatType : integer;
  738.                         WhichProperty : string15;
  739.                         MemberName : string47; MemberType : integer) : boolean;
  740. procedure LockFileSet(TimeOutTics : integer);
  741. procedure LockLogicalRecordSet(TimeOutTics : integer);
  742. procedure LockPhysicalRecordSet(Mode : LockDirectives; TimeOutTics : integer);
  743. function  LoggedHasConsolePrivileges : boolean;
  744. procedure LogFile(FileName : string; Mode : LogModes; TimeOutTics : integer);
  745. procedure LogLogicalRecord(RecordName : string99;
  746.                            Mode : LogicalLockDirectives; TimeOutTics : integer);
  747. procedure LogNetworkMessage(Message : string80);
  748. procedure LogPhysicalRecord(FileHandle : word; Mode : LogicalLockDirectives;
  749.                             RecordStartOffset, RecordLength : longint;
  750.                             TimeOutTics : integer);
  751. procedure LoginToFileServer(WhichObject : string47; WhatType : integer;
  752.                             Password : string27);
  753. procedure LogOut;
  754. procedure LogOutFromFileServer(ConnectionID : integer);
  755. function  LPTCaptureActive(var QueuingServerConnectionID : integer) : boolean;
  756. procedure ModifyMaximumRightsMask(Directory : string; DirHandle : byte;
  757.                                   RevokeRights, GrantRights : byte);
  758. function  NumberOfLocalDrives : integer;
  759. procedure OpenBindery;
  760. procedure OpenMessagePipe(DestinationConnections : string100;
  761.                           var InitialPipeStatus : string100);
  762. procedure OpenSemaphore(SemaphoreName : string127; InitialValue : integer;
  763.                         var SemaphoreHandle : longint; var OpenCount : integer);
  764. function  PreferredConnectionID : integer;
  765. function  PrimaryConnectionID : integer;
  766. procedure PurgeAllErasedFiles;
  767. procedure PurgeErasedFiles;
  768. procedure ReadJobQueueEntry(QueueID : longint; JobNumber : integer;
  769.                             var Job : JobEntryRecord);
  770. procedure ReadPropertyValue(WhichObject : string47; WhatType : integer;
  771.                             WhichProperty : string15; SegmentNumber : integer;
  772.                             var Property;
  773.                             var PropertyFlags : byte;
  774.                             var MoreSegments  : boolean);
  775. procedure ReadQueueCurrentStatus(QueueID : longint;
  776.                                  var QueueStatus : byte;
  777.                                  var NumberOfEntries : byte;
  778.                                  var NumberOfServers : byte;
  779.                                  var ServerIDList      : IDList;
  780.                                  var ServerStationList : StationList);
  781. procedure ReadServerCurrentStatus(QueueID,ServerID : longint;
  782.                                   ServerStation : byte;
  783.                                   var ServerStatus : ServerStatusType);
  784. procedure ReleaseFile(FileName : string);
  785. procedure ReleaseFileSet;
  786. procedure ReleaseLogicalRecord(LogicalRecord : string99);
  787. procedure ReleaseLogicalRecordSet;
  788. procedure ReleasePhysicalRecord(FileHandle : word;
  789.                             RecordStartOffset, RecordLength : longint);
  790. procedure ReleasePhysicalRecordSet;
  791. procedure RemoveJobFromQueue(QueueID : longint; JobNumber : integer);
  792. procedure RenameDirectory(Directory : string; DirHandle : byte;
  793.                           NewDirectory : string);
  794. procedure RenameObject(WhichObject : string47; WhatType : integer;
  795.                        NewName : string47);
  796. procedure RestoreEraseFile(VolumeName : string16; DirHandle : byte;
  797.                            var ErasedFilename, RestoredFilename : string);
  798. procedure RestoreServersRights;
  799. procedure ScanDirectoryForTrustees(Directory : string; DirHandle : byte;
  800.                                    var SequenceNumber : byte;
  801.                                    var FoundDirectory : string16;
  802.                                    var OwnerID : longint;
  803.                                    var CreationDate : longint;
  804.                                    var FiveTrustees : TrusteeIDArray;
  805.                                    var FiveRights   : TrusteeRightsArray);
  806. procedure ScanDirectoryInfomation(Directory : string; DirHandle : byte;
  807.                                   var SequenceNumber   : integer;
  808.                                   var FoundDirectory   : string16;
  809.                                   var OwnerID          : longint;
  810.                                   var CreationDate     : longint;
  811.                                   var MaximumRightsMask: byte);
  812. procedure ScanFileInformation(FileName : string; DirHandle : byte;
  813.                               SearchAttribute : byte;
  814.                               var SequenceNumber : integer;
  815.                               var FoundFile : string13;
  816.                               var FileAttributes : byte;
  817.                               var ExtendedAttributes : byte;
  818.                               var FileSize : longint;
  819.                               var OwnerID : longint;
  820.                               var CreationDate : word;
  821.                               var LastAccessDate : word;
  822.                               var LastUpdateDate : longint;
  823.                               var LastArchiveDate : longint);
  824. procedure ScanObject(ScanMask : string47; ScanType : integer;
  825.                      var LastSeen           : longint;
  826.                      var FoundName          : string47;
  827.                      var FoundType          : integer;
  828.                      var FoundID            : longint;
  829.                      var FoundFlag          : byte;
  830.                      var FoundSecurity      : byte;
  831.                      var FoundHasProperties : boolean);
  832. procedure ScanObjectTrusteePaths(WhichVolume   : byte;
  833.                                  WhichObjectID : longint;
  834.                                  var LastSeen  : integer;
  835.                                  var TrusteePath   : string;
  836.                                  var TrusteeRights : byte);
  837. procedure ScanProperty(WhichObject : string47; WhatType : integer;
  838.                        ScanMask : string15;
  839.                        var LastSeen       : longint;
  840.                        var FoundName      : string15;
  841.                        var FoundFlags     : byte;
  842.                        var FoundSecurity  : byte;
  843.                        var FoundHasValue  : boolean;
  844.                        var MoreProperties : boolean);
  845. procedure SendBroadcastMessage(Message : string55; Connections : string100;
  846.                                var ResultCodes : string100);
  847. procedure SendConsoleBroadcast(Message : string55; Connections : string100);
  848. procedure SendPersonalMessage(Message : string126; ConnectionList : string100;
  849.                               var ResultCodes : string100);
  850. procedure ServiceQueueJob(QueueID : longint; TargetServiceType : integer;
  851.                           var Job : JobEntryRecord);
  852. procedure SetBannerUserName(BannerName : BannerArray);
  853. procedure SetBroadcastMode(NewMode : BroadcastModes);
  854. procedure SetCapturePrintJob(PrintQueueJobNumber : integer;
  855.                              NetWareFileHandle : FileServerFileHandle;
  856.                              Device : LPTNames);
  857. procedure SetCapturePrintQueue(PrintQID : longint; Device : LPTNames);
  858. procedure SetDefaultCaptureFlags(var CaptureInfo : CaptureFlags);
  859. procedure SetDefaultLocalPrinter(Device : LPTNames);
  860. procedure SetDirectoryHandle(SourceDirectory : string;
  861.                              SourceDirHandle, TargetDirHandle : byte);
  862. procedure SetDirectoryInformation(Directory : string; DirHandle : byte;
  863.                                   NewOwner : longint; NewCreationDate : longint;
  864.                                   MaximumRightsMask : byte);
  865. procedure SetEndOfJobStatus(Mode : EndOfJobStatus);
  866. procedure SetErrorMode(Mode : ErrorModes);
  867. procedure SetExtendedFileAttributes(Filename : string; ExtendedAttributes : byte);
  868. procedure SetFileInformation(Filename : string; DirHandle : byte;
  869.                              SearchAttributes : byte;
  870.                              FileAttributes,ExtendedAttributes : byte;
  871.                              OwnerID : longint;
  872.                              CreationDate,LastAccessDate : integer;
  873.                              LastUpdateDate,LastArchiveDate : longint);
  874. procedure SetFileServerDateAndTime(NewTime : ServerTimeRecord);
  875. procedure SetLockMode(NewMode : LockModes);
  876. procedure SetPreferredConnectionID(PreferredConnection : byte);
  877. procedure SetPrimaryConnectionID(PrimaryConnection : byte);
  878. procedure SetQueueCurrentStatus(QueueID : longint; QueueStatus : byte);
  879. procedure SetServerCurrentStatus(QueueID : longint;
  880.                                  var ServerStatus : ServerStatusType);
  881. procedure SetSpecificCaptureFlags(Device : LPTNames;
  882.                                    var CaptureInfo : CaptureFlags);
  883. procedure SignalSemphore(SemaphoreHandle : longint);
  884. procedure SpecifyCaptureFile(Filename : string; DirHandle : byte);
  885. procedure StartLPTCapture;
  886. procedure StartSpecificCapture(Device : LPTNames);
  887. procedure SubmitAccountCharge(WhichObject : string47;
  888.                               WhatType, ServiceType : integer;
  889.                               Charge, CancelHoldAmount : longint;
  890.                               CommentType : CommentTypes; Comment : string);
  891. procedure SubmitAccountHold(WhichObject : string47; WhatType : integer;
  892.                             AmountToReserve : longint);
  893. procedure SubmitAccountNote(WhichObject : string47; WhatType : integer;
  894.                             ServiceType : integer;
  895.                             CommentType : CommentTypes; Comment : string);
  896. procedure TTSAbortTransaction;
  897. procedure TTSBeginTransaction;
  898. procedure TTSEndTransaction(var ReferenceNumber : longint);
  899. procedure TTSGetApplicationTresholds(var LogicalLockThreshold,
  900.                                          PhysicalLockThreshold : byte);
  901. procedure TTSGetWorkstationThresholds(var LogicalLockThreshold,
  902.                                           PhysicalLockThreshold : byte);
  903. function  TTSIsAvailable : boolean;
  904. procedure TTSSetApplicationTresholds(LogicalLockThreshold,
  905.                                      PhysicalLockThreshold : byte);
  906. procedure TTSSetWorkstationThresholds(LogicalLockThreshold,
  907.                                       PhysicalLockThreshold : byte);
  908. procedure TTSTransactionStatus(TransactionReferenceNumber : longint);
  909. procedure VerifyObjectPassword(WhichObject : string47; WhatType : integer;
  910.                                Password : string127);
  911. procedure WaitOnSemaphore(SemaphoreHandle : longint; TimeoutLimit : integer);
  912. procedure WritePropertyValue(WhichObject : string47; WhatType : integer;
  913.                              WhichProperty : string15; var PropertyValue;
  914.                              SegmentNumber : integer; MoreSegments : boolean);
  915. (****************************************************************************)
  916.  
  917. procedure FixNetwareQueueHeaderRecord(var NetwarePrintQueueRecord);
  918. procedure FixServerMiscInfoRec(var InfoRec : ServerMiscInformation);
  919. procedure FixServerLANIOStatisticsRec(var InfoRec : ServerLANIOStatistics);
  920. procedure FixFileSystemStatistics(var InfoRec : FileSystemStatistics);
  921. procedure LongReverse(var ALong : longint);
  922. function  ReverseWord(BackwardsWord : word) : word;
  923. function  ReverseLong(BackwardsLong : longint) : longint;
  924. procedure WordReverse(var AWord : word);
  925.